]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
tools/toolbox: Expose --wipe meson flag
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 12 Jan 2024 13:28:03 +0000 (14:28 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 15 Jan 2024 17:18:09 +0000 (17:18 +0000)
It's useful when the existing build directory became invalid,
for instance after a meson update, and exposing it directly
from the wrapper script is more convenient than removing the
directory or entering the toolbox manually to invoke meson.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3113>

tools/toolbox/meson-build.sh

index 82234f1197c1cc61ffc8e5b0f061d041946bcadb..a8d79f1fdea07be92f7807731d0ec148fc8300aa 100755 (executable)
@@ -16,6 +16,7 @@ usage() {
 
          -Dkey=val               Option to pass to meson setup
          --dist                  Run meson dist
+         --wipe                  Wipe build directory and reconfigure
 
          -h, --help              Display this help
 
@@ -49,6 +50,7 @@ TEMP=$(getopt \
   --options 't:D:h' \
   --longoptions 'toolbox:' \
   --longoptions 'dist' \
+  --longoptions 'wipe' \
   --longoptions 'help' \
   -- "$@") || die "Run $(basename $0) --help to see available options"
 
@@ -69,6 +71,11 @@ while true; do
       shift
     ;;
 
+    --wipe)
+      WIPE=--wipe
+      shift
+    ;;
+
     -D)
       MESON_OPTIONS+=(-D$2)
       shift 2
@@ -94,7 +101,7 @@ BUILD_DIR=build-$TOOLBOX
 needs_reconfigure && RECONFIGURE=--reconfigure
 
 toolbox run --container $TOOLBOX sh -c "
-  meson setup --prefix=/usr $RECONFIGURE ${MESON_OPTIONS[*]} $BUILD_DIR &&
+  meson setup --prefix=/usr $RECONFIGURE $WIPE ${MESON_OPTIONS[*]} $BUILD_DIR &&
   meson compile -C $BUILD_DIR &&
   sudo meson install -C $BUILD_DIR &&
   $DIST